#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLog;

namespace UTable.Logger
{
    /// <summary>
    /// This logger is used to log standard user messages
    /// </summary>
    public class ULogger
    {
        private static NLog.Logger _logger;

        internal static void Initialize()
        {
            _logger = LogManager.GetLogger("User");
        }

        public static void Log(LogLevel level, object obj)
        {
            _logger.Log(level, obj);
        }

        public static void Log(LogLevel level, string message)
        {
            _logger.Log(level, message);
        }

        public static void Trace(object obj)
        {
            _logger.Trace(obj);
        }

        public static void Trace(string message)
        {
            _logger.Trace(message);
        }

        public static void Debug(object obj)
        {
            _logger.Debug(obj);
        }

        public static void Debug(string message)
        {
            _logger.Debug(message);
        }

        public static void Info(object obj)
        {
            _logger.Info(obj);
        }

        public static void Info(string message)
        {
            _logger.Info(message);
        }

        public static void Warm(object obj)
        {
            _logger.Warn(obj);
        }

        public static void Warm(string message)
        {
            _logger.Warn(message);
        }

        public static void Error(object obj)
        {
            _logger.Error(obj);
        }

        public static void Error(string message)
        {
            _logger.Error(message);
        }

        public static void Fatal(object obj)
        {
            _logger.Fatal(obj);
        }

        public static void Fatal(string message)
        {
            _logger.Fatal(message);
        }

        public static void LogException(LogLevel level, string message, Exception exception)
        {
            _logger.LogException(level, message, exception);
        }

        public static void TraceException(string message, Exception exception)
        {
            _logger.TraceException(message, exception);
        }

        public static void DebugException(string message, Exception exception)
        {
            _logger.DebugException(message, exception);
        }

        public static void InfoException(string message, Exception exception)
        {
            _logger.InfoException(message, exception);
        }

        public static void WarnException(string message, Exception exception)
        {
            _logger.WarnException(message, exception);
        }

        public static void ErrorException(string message, Exception exception)
        {
            _logger.ErrorException(message, exception);
        }

        public static void FatalException(string message, Exception exception)
        {
            _logger.FatalException(message, exception);
        }
    }
}
